package org.esprit.ocm.model.ec2;

import com.xerox.amazonws.ec2.InstanceType;

import net.sf.gilead.pojo.java5.LightEntity;

/**
 * An instance of this class represents an EC2 instance slot reservation.
 */
public class InstanceDescriptionMapping extends LightEntity {
	
	/**
	 * 
	 */
	private static final long	serialVersionUID	= 3616876234587243416L;

	/**
	 * Reservation information
	 */
	private String owner;
	private String resId;
	private String groups;
	
	/**
	 * Instance information
	 */
	private String imageId;
	private String instanceId;
	private String privateDnsName;
	private String dnsName;
	private String reason;
	private String keyName;
	private String instanceType;
	private String launchIndex;
	private String launchTime;
	private String availabilityZone;
	private String kernelId;
	private String ramdiskId;
	private String platform;

	/**
	 * An EC2 instance may be in one of four states:
	 * <ol>
	 * <li><b>pending</b> - the instance is in the process of being
	 * launched.</li>
	 * <li><b>running</b> - the has been launched. It may be in the
	 * process of booting and is not yet guaranteed to be reachable.</li>
	 * <li><b>shutting-down</b> - the instance is in the process of
	 * shutting down.</li>
	 * <li><b>terminated</b> - the instance is no longer running.</li>
	 * </ol>
	 */
	private String state;
	private boolean monitoring;
//	private String stateCode;
//	private String subnetId;
//	private String vpcId;
//	private String privateIpAddress;
//	private String ipAddress;
//	private String architecture;
//	private String rootDeviceType;
//	private String rootDeviceName;
//	private String instanceLifecycle;
//	private String spotInstanceRequestId;
//	private String virtualizationType;

	public String getImageId() {
		return imageId;
	}

	public String getInstanceId() {
		return instanceId;
	}

	public String getPrivateDnsName() {
		return privateDnsName;
	}

	public String getDnsName() {
		return dnsName;
	}

	public String getReason() {
		return reason;
	}

	public String getKeyName() {
		return keyName;
	}

	public String getLaunchIndex() {
		return launchIndex;
	}

	public String getState() {
		return state;
	}

	public boolean isRunning() {
		return this.state.equals("running");
	}

	public boolean isPending() {
		return this.state.equals("pending");
	}

	public boolean isShuttingDown() {
		return this.state.equals("shutting-down");
	}

	public boolean isTerminated() {
		return this.state.equals("terminated");
	}

//	public String getStateCode() {
//		return stateCode;
//	}

	public String getAvailabilityZone() {
		return availabilityZone;
	}

	public String getKernelId() {
		return kernelId;
	}

	public String getRamdiskId() {
		return ramdiskId;
	}

	public String getPlatform() {
		return platform;
	}

	public boolean isMonitoring() {
		return monitoring;
	}

	public void setImageId(String imageId) {
		this.imageId = imageId;
	}

	public void setInstanceId(String instanceId) {
		this.instanceId = instanceId;
	}

	public void setPrivateDnsName(String privateDnsName) {
		this.privateDnsName = privateDnsName;
	}

	public void setDnsName(String dnsName) {
		this.dnsName = dnsName;
	}

	public void setReason(String reason) {
		this.reason = reason;
	}

	public void setKeyName(String keyName) {
		this.keyName = keyName;
	}

	public void setLaunchIndex(String launchIndex) {
		this.launchIndex = launchIndex;
	}

	public void setAvailabilityZone(String availabilityZone) {
		this.availabilityZone = availabilityZone;
	}

	public void setKernelId(String kernelId) {
		this.kernelId = kernelId;
	}

	public void setRamdiskId(String ramdiskId) {
		this.ramdiskId = ramdiskId;
	}

	public void setPlatform(String platform) {
		this.platform = platform;
	}

	public void setState(String state) {
		this.state = state;
	}

	public void setMonitoring(boolean monitoring) {
		this.monitoring = monitoring;
	}

	public String getOwner() {
		return owner;
	}

	public void setOwner(String owner) {
		this.owner = owner;
	}

	public String getResId() {
		return resId;
	}

	public void setResId(String resId) {
		this.resId = resId;
	}

	public void setGroups(String groups) {
		this.groups = groups;
	}

	public String getGroups() {
		return groups;
	}

	public void setLaunchTime(String launchTime) {
		this.launchTime = launchTime;
	}

	public String getLaunchTime() {
		return launchTime;
	}

	public void setInstanceType(String instanceType) {
		this.instanceType = instanceType;
	}

	public String getInstanceType() {
		return instanceType;
	}
	

//	public String getSubnetId() {
//		return subnetId;
//	}
//
//	public String getVpcId() {
//		return vpcId;
//	}
//
//	public String getPrivateIpAddress() {
//		return privateIpAddress;
//	}
//
//	public String getIpAddress() {
//		return ipAddress;
//	}
//
//	public String getArchitecture() {
//		return architecture;
//	}
//
//	public String getRootDeviceType() {
//		return rootDeviceType;
//	}
//
//	public String getRootDeviceName() {
//		return rootDeviceName;
//	}
//
//	public String getInstanceLifecycle() {
//		return instanceLifecycle;
//	}
//
//	public String getSpotInstanceRequestId() {
//		return spotInstanceRequestId;
//	}
//
//	public String getVirtualizationType() {
//		return virtualizationType;
//	}
	
}
